Present invention relates to an image processing apparatus and method thereof, and more particularly to an image recognition apparatus and a method for recognizing an image represented by inputted image data, and an image processing apparatus and a method which employs the image recognition apparatus and the method.
Conventionally, color printing was unable to perform unless it was done by a professional printer, however, today, along with the penetration of color copying machine or color printer, color printing can be easily performed by anyone, and high quality full-color print can be easily obtained.
Since the law prohibits making copies of documents such as paper money, stocks or bonds, the demand is high for a technique to prevent copying (reproduction) of a document whose images should not be copied (reproduced) (hereinafter referred to as a "specified document") by employing a color copying machine or a color printer, even though such apparatuses are widely used. Prevention technique is to generate reference data based on image data of a specified document and determine whether or not an inputted image is a specified image by referring to the reference data. Most of such techniques are performed by mapping inputted image data in a memory, extracting characteristics of the input document, and performing pattern matching or fuzzy analysis or the like on the input document stored in the memory to detect characteristics of a specified document, thereby preventing copying (reproduction) of the specified document.
There is an apparatus which performs detection of such characteristics in the R, G and B color space and an apparatus which performs the same in the Y, M, C and K color space for a printer.
Image processing software recently available are capable of handling both color spaces: the R, G and B color space and the Y, M, C and K color space.
In order to output a full-color image by a printer having low tonality e.g. an inkjet printer, image processing such as dither processing or error diffusion processing or the like for increasing pseudotonality is generally performed. Such processing is performed by employing a method of representing halftone by controlling, in a unit dimension, magnitude of an area which is represented by each color components such as C, M, Y and K (hereinafter referred to as the "area halftone method"). The processing is a technique used to increase tonality in a low spatial frequency of an image. When the area halftone method is utilized, resolution of an outputted image tends to deteriorate. However on account of recent significant improvement in resolution of printers, deterioration in resolution of the outputted image is kept to a minimum level.
FIG. 1 is a block diagram showing an arrangement of a printer. Image data 101 of the R, G and B color space inputted from a host computer (not shown) or the like is converted to image data 103 of the Y, M, C and K color space for a printer by a reproduction converter 102 (hereinafter referred to as "RF converter"). In other words, the RF converter 102 converts image data from the R, G and B color space to the Y, M, C and K color space, and performs under color removal processing (hereinafter referred to as "UCR") as well as masking processing for correcting color reproducing characteristics of colorant e.g. a toner or the like, are performed. The image data 103 is then inputted to a printer engine 104 where each of color component images respectively having Y, M, C and K colors is placed on top of each other, and outputted as a color image output 105.
A printer is an image forming apparatus which forms a color image by subtractive mixture. Therefore, no matter what color space inputted data has, image data ultimately inputted into the printer engine 104 is the data converted into the Y, M, C and K color space or the Y, M and C color space.
There is also a case where the RF conversion is performed by an image processing software driven on a host computer, such as an image retouching software, a printer driver or the like. In this case, image data of the Y, M, C and K color space is directly inputted into a printer.
As set forth above, in order to determine in a printer unit whether or not an image subjected to printing is an image of a specified document, it is necessary to detect the specified document in the Y, M, C and K color space or the Y, M and C color space.
As functions of a host computer have recently improved, in most cases, image data is first converted to the Y, M, C and K or Y, M and C data form by the aforementioned image processing software before being sent to a printer. Therefore, in order to detect the specified document in the printer unit, it is necessary to recognize an image in the Y, M, C and K color space or the Y, M and C color space.
However, image recognition in the Y, M, C and K or Y, M and C color spaces raises the following problem.
In the R, G and B color space, image recognition can be performed on the basis of luminance data which has a relatively large dynamic range. On the other hand, since Y, M and C data is obtained by performing log conversion on the luminance data of R, G and B color space, the dynamic range of the Y, M and C data is compressed, making it difficult to perform accurate image recognition. Moreover, when conversion into Y, M, C and K data is performed, amplitude of each of the Y, M and C data is further compressed by the UCR processing, resulting in further deterioration of accuracy in image recognition. Furthermore, correction (gamma correction) is performed for each of the color components (Y, M, C and K) in order to correct characteristics of a printer engine. Because of the differences, the relationship between Y, M, C and K image data and original luminance data in the R, G and B color space becomes non-linear. Moreover, errors or the like generated in the conversion process also influences accuracy of the image recognition operation. Accordingly, precise image recognition cannot be performed on the basis of Y, M, C and K or Y, M and C image data.
When the "area halftone method" is utilized, accurate image recognition is possible only when the relationship between input data and output data of the area halftone processing is linear. However, if non-linear processing is included to the area halftone processing, precise image reproduction such as that will be described later becomes difficult and accurate image recognition cannot be expected.
FIG. 8 shows a relationship between a luminance signal and a density signal in general. Herein, the RF conversion will be explained in a simplified form of luminance-density conversion.
Generally, the characteristics of conversion from R, G and B data to Y, M, C and K data result in a graph in FIG. 8. The horizontal axis in FIG. 8 expresses a normalized value of luminance signals of R, G and B and the vertical axis expresses a normalized value of density signals of Y, M, C and K. For instance, when a luminance signal value is 0.3, the corresponding density signal value is 0.5.
When the conversion from R, G and B to Y, M, C and K is characterized by the graph shown in FIG. 8, if four pixels having a luminance signal value 0.3 as indicated by reference numeral 111 in FIG. 9 is inputted in the RF converter, an output of the RF converter results in the reference numeral 112 in FIG. 9. When the signal 112 is inputted to a dither processor to perform dither processing in a unit of 2.times.2 pixels, the signal data is converted to representation values 0 and 1 indicative of a density value, as illustrated by reference numeral 113 in FIG. 9. Printing out the signal data would result in reference numeral 114 in FIG. 9. Herein, a mean value of density in the entire printout is 0.5. In other words, the density data indicated by the reference numeral 112 in FIG. 9, where each pixel has a density value of 0.5, is expressed by the method of area halftone.
In performing image recognition, if luminance data is to be restored on the basis of the signal where the aforementioned dither processing has been performed, the above described condition of utilizing the area halftone method, that is, to have linear relationship between input data and output data, cannot be satisfied because non-linear luminance-density conversion shown in FIG. 8 is performed on the dither-processed signal. Restoring of luminance data from the dither-processed signal is equivalent to obtaining of data indicated by reference numeral 115 in FIG. 9 from the data 113 in FIG. 9 by utilizing the conversion characteristics shown in FIG. 8. Herein, a mean value of luminance data 111 is 0.3 while the mean value of the luminance data 115 is 0.5.
As described above, a printer system employing the area halftone processing e.g., dither processing or error diffusion processing, raises the problem of extreme deterioration of image recognition capability, or in the worse case, inability of image recognition operation.